RtndFrameTransmit

RtndFrameTransmit can be called when the filter or RTSS application wants to transmit a frame pointed to by the parameter EthernetFrame. The frame must be in a format required by the standard Ethernet format.

The source physical address must match the physical address of one of the enabled RTX64 interfaces. It is used to select an interface to transmit a frame.

NOTE: RtndFrameTransmit cannot be called within RtndReceiveFilter.

Syntax

BOOL RtndFrameTransmit(
   void *pEthernetFrame,
   unsigned long ulDataSize,
   unsigned int uLayer
);

Parameters

pEthernetFrame

Pointer to an Ethernet frame header.

ulDataSize

Size of the Ethernet payload data.

uLayer

Not supported.

Return Value

A return value of FALSE indicates the frame is being dropped, TRUE indicates that newly generated frame is being transmitted. An error code can be retrieved by WSAGetLastError. The possible error codes are:

Error Code Meaning
WSAENETDOWN The stack has not started or has not yet initialized the specified interface.
WSAEMSGSIZE ulDataSize is < 46 or too large for the device MTU.
WSAEFAULT pEthernetFrame is a NULL pointer.
ERROR_DEV_NOT_EXIST The specified interface does not exist or has not initialized.
ERROR_IO_DEVICE Driver send function returned an error. This can be caused when an available DMA buffer cannot be found, or when the Ethernet link is down.

Requirements

Minimum Supported Version RTX64 2013
Header RtnApi.h
Library RtTcpip.lib